package com.annotation.handler;

import com.annotation.service.BookService;
import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.stereotype.Controller;

import javax.annotation.Resource;

@Controller
public class BookHeandler implements InitializingBean,DisposableBean {

    @Resource
    private BookService bookService;

    @Override
    public void afterPropertiesSet() throws Exception {
        System.out.println(bookService);
    }

    @Override
    public void destroy() throws Exception {
        System.out.println("BookHandler Destroy");
    }
}
